<script>
export default {
  name: "LogList",
  props: {
    data: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      tableOptions: {
        //新增按钮
        addBtn: false,
        header: false,
        viewBtn: false,
        delBtn: false,
        editBtn: false,
        refreshBtn: false,
        columnBtn: false,
        searchShowBtn: false,
        stripe: false,
        selection: false,
        tip: true,
        // simplePage: false,
        searchMenuSpan: 8,
        border: true,
        index: false,
        height:'auto',
        indexWidth: 60,
        indexLabel: "序号",
        menuWidth: 100,
        menu: true,
        align: "left",
        menuAlign: "left",
        dialogWidth: "40%",
        dialogClickModal: false,
        dialogType: "drawer",
        span: 24,
        dialogCustomClass: "huilan-drawer-form",
        emptyText: this.$t('aicosCommon.notData'),
        column: [
          {
            label: 'apply_id',
            prop: 'id',
            width: 100
          },
          {
            label: 'apply_time',
            prop: 'apply_time'
          },
          {
            label: 'resource_code',
            prop: 'resource_code',
            width: 180

          },
          {
            label: 'resource_port',
            prop: 'resource_port'
          },
          {
            label: 'status',
            prop: 'status'
          },
          {
            label: 'resource_create_time',
            prop: 'resource_create_time',
            width: 180

          },
          {
            label: 'resource_release_time',
            prop: 'resource_release_time',
            width: 180
          },
          {
            label: 'msg',
            prop: 'msg',
            width: 280
          }
        ]
      }
    }
  },
  methods: {
    closeProcess(val) {
      this.$emit('on-close', val)
    }
  }
}
</script>

<template>
  <div>
    <avue-crud
      ref="listRef"
      :option="tableOptions"
      :data="data"
    >
      <template #menu="{row}">
        <el-button type="text" @click="closeProcess(row)" :disabled="row.status !== 4">关闭进程</el-button>
      </template>
    </avue-crud>
  </div>
</template>

<style scoped lang="scss">

</style>
